package com.xw.musicplayer.focus;


import android.content.Context;
import android.media.AudioManager;

/**
 * 焦点管理接口.
 *
 * @author ingxin
 * @date 2020/5/24
 */
public abstract class BaseAudioFocusHelper {

    protected AudioManager.OnAudioFocusChangeListener mFocusChangeListener;

    public BaseAudioFocusHelper(AudioManager.OnAudioFocusChangeListener listener) {
        this.mFocusChangeListener = listener;
    }

    /**
     * 请求音频焦点
     *
     * @param context context
     */
    public abstract void request(Context context);

    /**
     * 释放焦点.
     */
    public abstract void abandon();

}
